package cn.com.gzheroli.service.bfw;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import cn.com.gzheroli.bfw.pojo.base.TSUser;
import cn.com.gzheroli.tag.vo.easyui.ZNodes;


public interface RedisCacheService{

	public   TSUser getSessionUserName(String sessionId);
	public <T> boolean putCache(String key, T obj);
	public <T> void putCacheWithExpireTime(String key, T obj, final long expireTime);
	public <T> boolean putListCache(String key, List<T> objList);
	public <T> boolean putListCacheWithExpireTime(String key, List<T> objList, final long expireTime);
	public <T> T getCache(final String key, Class<T> targetClass);
	public <T> List<T> getListCache(final String key, Class<T> targetClass);
	/**
	 * 精确删除key
	 * 
	 * @param key
	 */
	public void deleteCache(String key);
	/**
	 * 模糊删除key
	 * 
	 * @param pattern
	 */
	public void deleteCacheWithPattern(String pattern);
	/**
	 * 清空所有缓存
	 */
	public void clearCache();
	public boolean containsKey(String key);
}
